﻿@page "/nav/{Id:int?}"

@*
    导航参数


    /action/1
    /list/2?page=3&name=张三
*@

@if (Id.HasValue)
{
    <text>获取的参数：@Id</text>
    <p>
        Name 参数是：@Name
    </p>
    <p>
        当前页码：@PageIndex
    </p>
}
else
{
    <p>没有任何参数</p>
}

@code{
    [Parameter]public int? Id{get;set;}
    
    [Parameter][SupplyParameterFromQuery]public string? Name{get;set;}

    [Parameter][SupplyParameterFromQuery(Name="page")]public int? PageIndex{get;set;}
}